package buzhidao;

class Student {
    private int age;
    private String name;
    private static String school = "A university";
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void information() {
        System.out.println("姓名：" + this.name + " 年龄：" + this.age + " 学校是" + school);
    }
    public static String getSchool() {
        return school;
    }
    public static void setSchool(String s) {
        school = s;
    }
}
public class StaticTest1{
    public static void main(String[] args) {
        Student student1 = new Student("TOM", 19);
        Student student2 = new Student("JERRY", 23);
        System.out.println("----修改前----");
        student1.information();
        student2.information();
        System.out.println("----修改后----");
        Student.setSchool("B学校");
        student1.information();
        student2.information();
    }
}